import request from '@/utils/request'
/**
 * 得助智能 查询登录token
 */
export function crmCallInitTokenAPI(data) {
  return request({
    url: 'crmCall/initToken',
    method: 'post',
    data: data
  })
}

/**
 * @description: 获取得助js的链接
 * @return {*}
 */
export function crmCallGetDZUrlAPI() {
  return request({
    url: 'crmCall/getDZUrl ',
    method: 'post'
  })
}

/**
 * 呼叫中心状态是否启用
 * @param {*} data
 */
export function crmCallAuthorizeAPI(data) {
  return request({
    url: 'crmCall/authorize',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 呼叫中心客服的权限
 * @param {*} data
 * id 客户IDs
 */
export function crmCallCheckAuthAPI(data) {
  return request({
    url: 'crmCall/checkAuth',
    method: 'post',
    data: data
  })
}

/**
 * 呼叫中心客服的权限
 * @param {*} data
 * id 客户IDs
 */
export function crmCallSaveAPI(data) {
  return request({
    url: 'crmCall/save',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 获取图片验证码
 * @param {*} data
 */
export function crmCallBdGetImageAPI() {
  return request({
    url: 'crmCallBd/getImage',
    method: 'post'
  })
}

/**
 * 发送短信验证码
 * @param {*} data
 * data.imgCode 图片验证码
 * data.phone 手机号
 * data.uuid 图片验证码uuid
 */
export function crmCallBdSendSmsCodeAPI(data) {
  return request({
    url: 'crmCallBd/sendSmsCode',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 添加坐席
 * @param {*} data
 */
export function crmCallBdAddSeatAPI(data) {
  return request({
    url: 'crmCallBd/addSeat',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
